package top.yxqz.vagrancy.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * token表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("token")
public class TokenEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 用户id
     */
    private Long userid;

    /**
     * 用户名
     */
    private String username;

    /**
     * 表名
     */
    private String tablename;

    /**
     * 角色
     */
    private String role;

    /**
     * token
     */
    private String token;

    /**
     * 过期时间
     */
    private Date expiratedtime;

    /**
     * 新增时间
     */
    private Date addtime;

    public TokenEntity(Long userid, String username, String tablename, String role, String token, Date expiratedtime) {
        super();
        this.userid = userid;
        this.username = username;
        this.tablename = tablename;
        this.role = role;
        this.token = token;
        this.expiratedtime = expiratedtime;
    }
}
